const desensitizationName = (str: string) => {
	return str
	if (null == str || str == undefined || str.length == 0) {
		return ''
	}
	if (str.length == 1) {
		return str
	}
	if (str.length == 2) {
		return str.substring(0, 1) + '*' //截取name 字符串截取第一个字符，
	}

	let starStr = ''
	for (let index = 0; index < str.length - 2; index++) {
		starStr += '*'
	}
	return str.substring(0, 1) + starStr + str.substring(str.length - 1, str.length)
}

const desensitizationPhone = (str: string) => {
	return str
	if (null == str || str == undefined || str.length == 0) {
		return ''
	}
	return str.replace(/^(.{3})(?:\d+)(.{4})$/, '$1****$2')
}

export {desensitizationName, desensitizationPhone}
